import axios from "axios";
export const uploadToGithub = (filename, base64Img) => {
  console.log(filename);
  const URL = `https://api.github.com/repos/zmf-6/cdn/contents/img/${filename}`;
  // request 请求实例
  return axios({
    url: URL,
    method: "put",
    headers: {
      Accept: "application/vnd.github.v3+json",
      Authorization:'token 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'
    },
    data: {
      message: "test1",
      committer: {
        name: "zmf-6",
        email: "3073799663@qq.com"
      },
      content: base64Img
    }
  });
};

